﻿@model IList<NewsletterSimpleCategory>
@if (Model.Any())
{
    <div class="row">
        <div class="col-12 form-group register-category-newsletter">
            <ul class="option-list pl-0">
                @foreach (var attribute in Model)
                {
                    <li>
                        @{
                            var controlId = $"customerNewsletterCategory_{attribute.Id}";
                        }
                        <label for="@(controlId)" class="custom-control custom-checkbox">
                            <input class="custom-control-input" id="@(controlId)" type="checkbox" name="SelectedNewsletterCategory" value="@(attribute.Id)"
                                   checked="@(attribute.Selected)"/>
                            <span class="custom-control-label"></span>
                            <span class="custom-control-description">@(attribute.Name)</span>
                        </label>
                        <div>
                            @Html.Raw(attribute.Description)
                        </div>
                    </li>
                }
            </ul>
        </div>
    </div>
}